/*
 * HighlightedNode.java
 *
 * Created on April 28, 2007, 1:25 PM
 *
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fpdev.apps.rtemaster.gui.map;

import java.awt.Color;
import java.awt.geom.Rectangle2D;
import org.fpdev.core.basenet.BNode;

/**
 *
 * @author demory
 */
public class HighlightedPoint implements MapDrawable {

  private double x_, y_;
  private Color color_;
  private int r_;
  public static Color STARTNODE_COLOR = Color.BLUE;
  public static Color ENDNODE_COLOR = Color.RED;

  /** Creates a new instance of HighlightedNode */
  public HighlightedPoint(BNode node, Color c, int r) {
    this(node.getX(), node.getY(), c, r);
  }
  
  public HighlightedPoint(double x, double y, Color c, int r) {
    x_ = x; y_ = y;
    color_ = c;
    r_ = r;
  }

  public void setXY(double x, double y) {
    x_ = x; y_ = y;
  }
  
  public void draw(MapCanvas canvas) {
    canvas.setColor(color_);
    canvas.drawPoint(x_, y_, r_);
  }

  public Rectangle2D getBoundingBox() {
    return new Rectangle2D.Double(x_, y_, 0, 0);
  }
}
